<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/5 0005
 * Time: 13:59
 */

namespace app\wap\validate;


use think\Validate;

class Message extends Validate
{
    protected $rule = [
        'data'          =>  '',
        'uid'           =>  'require',
        'model'         =>  'require|between:1,7',
        'content'       =>  'require|max:255',
    ];

    protected $message = [
        'uid.require'       =>  '请选择要发送的用户',
        'model.require'     =>  '请选择发布区域',
        'model.between'     =>  '请选择正确的区域',
        'content.require'   =>  '请输入消息内容',
        'content.max'       =>  '消息内容过长',
    ];

    protected $scene = [
        'msglist'   =>  ['data'],
        'msgsend'   =>  ['uid','model','content'],
    ];
}